package com.yonyou.cyxdms.basedata.service.dto.smstemplate;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;


/**
 * <p>
 * 短信模板
 * </p>
 *
 * @author dengqiang
 * @since 2019-09-19
 */

public class SmsTemplateDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    //主键
    private Long smsTemplateId;

    //短信模板类型
    private String smsTemplateType;

    //短信模板名称
    private String smsTemplateName;

    //短信模板内容
    private String smsTemplateContent;

    //是否默认
    private Integer isDefault;

    //数据来源
    private Integer dataSources;

    @ApiModelProperty(value = "版本号 修改时传值")
    private Integer recordVersion;

    public SmsTemplateDTO() {
        super();
    }


    public Long getSmsTemplateId() {
        return smsTemplateId;
    }


    public void setSmsTemplateId(Long smsTemplateId) {
        this.smsTemplateId = smsTemplateId;
    }


    public String getSmsTemplateType() {
        return smsTemplateType;
    }


    public void setSmsTemplateType(String smsTemplateType) {
        this.smsTemplateType = smsTemplateType;
    }


    public String getSmsTemplateName() {
        return smsTemplateName;
    }


    public void setSmsTemplateName(String smsTemplateName) {
        this.smsTemplateName = smsTemplateName;
    }


    public String getSmsTemplateContent() {
        return smsTemplateContent;
    }


    public void setSmsTemplateContent(String smsTemplateContent) {
        this.smsTemplateContent = smsTemplateContent;
    }


    public Integer getIsDefault() {
        return isDefault;
    }


    public void setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
    }


    public Integer getDataSources() {
        return dataSources;
    }


    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public Integer getRecordVersion() {
        return recordVersion;
    }

    public void setRecordVersion(Integer recordVersion) {
        this.recordVersion = recordVersion;
    }

    @Override
    public String toString() {
        return "SmsTemplateDTO{" +
                "smsTemplateId=" + smsTemplateId +
                ", smsTemplateType=" + smsTemplateType +
                ", smsTemplateName=" + smsTemplateName +
                ", smsTemplateContent=" + smsTemplateContent +
                ", isDefault=" + isDefault +
                ", dataSources=" + dataSources +
                ", recordVersion=" + recordVersion +
                "}";
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author dengqiang
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author dengqiang
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "smsTemplateId");
    }

}
